home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Answers 2002 January
/
PC Answers January 2002.7z
/
PC Answers January 2002.bin
/
graphics
/
freepixl
/
_SETUP.1
/
Context.pxl
< prev
next >
Wrap
Text File
|
2000-12-23
|
4KB
|
168 lines
Initialize:
UseCoordinates(PIXEL)
Title$ = "Test Context Sensitive Help"
UseCaption(Title$)
WinLocate(Title$,100,100,600,250,Res)
WinShow(Title$,NOTOPMOST,Res)
DirGet(SourceDir$)
UseBackGround(TRANSPARENT,192,192,192)
DrawBackGround
Context$ = ""
InfoMenu(REMOVE)
WaitInput(100)
SetMenu("&File",IGNORE,
"E&xit!",Run_Leave,
ENDPOPUP,
"&HLP File",Get_Hlp_File,
ENDPOPUP,
"&Select Context",IGNORE,
"&CONTEXT ID",Get_Hlp_File_1,
"&TOPIC_name",Get_Hlp_File_2,
ENDPOPUP,
"&MAP file",View_MAP,
ENDPOPUP,
"&Help",IGNORE,
"&Concept",Concept,
SEPARATOR,
"&About",About,
ENDPOPUP)
Wait_for_Input:
WaitInput()
Run_Leave:
End
Get_Hlp_File:
DrawBackGround
Filter$ = "Help Files(*.hlp),*.hlp"
Caption$ = "Select the Help file to run"
InitDir$ = SourceDir$
InitFile$ = "*.hlp"
HLPfile$ = ""
FileGet(Filter$,InitFile$,InitDir$,Caption$,CHANGEDIR,HLPfile$)
If HLPfile$ = "" Then Goto Wait_for_Input
Select$ = "Selected File " + HLPfile$
UseFont("Arial",9,21,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
DrawText(11,11,Select$)
UseFont("Arial",9,21,NOBOLD,NOITALIC,NOUNDERLINE,255,255,0)
DrawText(10,10,Select$)
Goto Wait_for_Input
Get_Hlp_File_1:
If HLPfile$ <> "" Then Goto Get_Hlp_File_1a
MessageBox(OK,1,EXCLAMATION,"Please select a Helpfile.",
"No HLP file has been selected",Res)
Goto Wait_for_Input
{endif}
Get_Hlp_File_1a:
Label$ = "WinHelp CONTEXT"
Text$ = "Help file: " + HLPfile$
Text$ = Text$ + "
Enter the context ID integer. If you don't know
what this is, see the help <project>.hh file."
TextBox(Text$,Label$,Context$,Btn)
If Btn = 2 Then Goto Wait_for_Input
If Context$ <> "" Then Goto Get_Hlp_File_1b
MessageBox(OK,1,EXCLAMATION,"Please enter a Context ID.",
"No Context ID selected.",Res)
Goto Get_Hlp_File_1a
Get_Hlp_File_1b:
CommandLine$ = "winhlp32 -n " + Context$
CommandLine$ = CommandLine$ + " "
CommandLine$ = CommandLine$ + HLPfile$
Run(CommandLine$)
Goto Wait_for_Input
Get_Hlp_File_2:
If HLPfile$ <> "" Then Goto Get_Hlp_File_2a
MessageBox(OK,1,EXCLAMATION,"Please select a Helpfile.",
"No HLP file has been selected",Res)
Goto Wait_for_Input
{endif}
Get_Hlp_File_2a:
Label$ = "WinHelp CONTEXT"
Text$ = "Help file: " + HLPfile$
Text$ = Text$ + "
Enter the exact TOPIC_NAME, using '_' between words.
If you don't know what this is, see the ROBOHELP
<project>.hh file."
TextBox(Text$,Label$,Context$,Btn)
If Btn = 2 Then Goto Wait_for_Input
If Context$ <> "" Then Goto Get_Hlp_File_2b
MessageBox(OK,1,EXCLAMATION,"Please enter a TOPIC_NAME.",
"No TOPIC_NAME selected.",Res)
Goto Get_Hlp_File_2a
Get_Hlp_File_2b:
CommandLine$ = "winhlp32 -i " + Context$
CommandLine$ = CommandLine$ + " "
CommandLine$ = CommandLine$ + HLPfile$
Run(CommandLine$)
Goto Wait_for_Input
View_MAP:
Filter$ = "MAP Files(*.hh),*.hh"
Caption$ = "Select the Help project map file"
InitDir$ = SourceDir$
InitFile$ = "*.hh"
HLPfile$ = ""
FileGet(Filter$,InitFile$,InitDir$,Caption$,CHANGEDIR,MAPfile$)
If MAPfile$ = "" Then Goto Wait_for_Input
CommandLine$ = "notepad " + MAPfile$
Run(CommandLine$)
Goto Wait_for_Input
Concept:
MessageBox(OK,1,INFORMATION,
"This utility is used to test the links to context
sensitive help topics in HLP files. You are asked
for a HLP file, and then a context ID number or the
actual topic. If a HLP file has not been defined,
you cannot enter an ID number. Once you have selected
an HLP file, you can select any context ID number or
topic.
You can also invoke NotePad to view ROBOHELP (tm)
generated <project>.hh files.This is the list
of '#define <context_id> <integer>' entries
needed for the Windows application developer.
If an ID number is entered, WINHELP is invoked
by the command line
'winhlp32 -n <integer> <project>.hlp'
or if a topic_name is entered, using
'winhlp32 -i <topic_name> <project>.hlp'
If WINHELP cannot locate the context ID or topic,
you will be prompted with a warning message that
the 'Topic does not exist'.",
"Context Sensitive Help",Res)
Goto Wait_for_Input
About:
AboutUser("About Context","Context Sensitive Help Test Program.",
"Copyright ⌐ (1995-98) VYSOR Integration Inc.
Gatineau, Quebec, CANADA. All Rights Reserved.")
Goto Wait_for_Input